package cc.lj.internal.merchant.application.event.publish;

import cc.lj.internal.merchant.domain.contract.event.ContractDomainEvent;
import cc.lj.internal.merchant.domain.contract.event.MerchantContractToMqEvent;
import lj.internal.dict.enums.EventSourceType;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.stream.annotation.EnableBinding;
import org.springframework.messaging.support.MessageBuilder;
import org.springframework.stereotype.Component;

@Slf4j
@Component
@EnableBinding(WmsMsgSource.class)
public class WmsMsgProducer {
    /*
    @Autowired
    private WmsMsgSource wmsMsgSource;

    public void sendMsg()
    {
        MerchantContractToMqEvent event = new MerchantContractToMqEvent();
        event.setContractId("abc123");

        ContractDomainEvent domainEvent = ContractDomainEvent.createDomainEvent(event, EventSourceType.HOTDATA);
        wmsMsgSource.testOut().send(MessageBuilder.withPayload(domainEvent).build());
    }
    */
}
